	var xmlHttp;

	var inputforms = findMid.getElementsByTagName('input');
	
	function findID(){
		startRequest();
	}


	function createXMLHttpRequest() {
	    if (window.ActiveXObject) {
	        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	    } 
	    else if (window.XMLHttpRequest) {
	        xmlHttp = new XMLHttpRequest();
	    }
	}
				
	function startRequest() {		
		var getMname = inputforms[0].value;

		var url = "signinajax.do?method=getMids"+"&fname="+escape(encodeURIComponent(getMname));
		
		createXMLHttpRequest();
	    xmlHttp.open("GET", url, true);
   	    xmlHttp.onreadystatechange = handleStateChange;
	    xmlHttp.send(null);
	}
	
	function handleStateChange() {
	    if(xmlHttp.readyState == 4) {
	    	if(xmlHttp.status == 200){
	    		parseResponse();	    		
			}	           
	    }
	}
	
	function parseResponse(){

		var mnameTR = findMid.getElementsByTagName('tr')[3];
		if(mnameTR.hasChildNodes()){
			for(var i=0;mnameTR.childNodes.length;i++){
				mnameTR.removeChild(mnameTR.childNodes[i]);			
			}
		}
		var xmlDoc = xmlHttp.responseXML;
		var lists = xmlDoc.getElementsByTagName('mname');

		var mnameTD = document.createElement('td');
		mnameTD.align = 'center';
		mnameTD.colSpan = 2;
				
		for(var i=0;i<lists.length;i++){
			var names = "";			
			names = lists[i].firstChild.nodeValue;
			var content = document.createTextNode(names);
			var DDs = document.createElement('div');
			DDs.appendChild(content);
			mnameTD.appendChild(DDs);
		}
		if(lists.length==0){
			var names = "";			
			names = "해당되는 데이터가 없습니다.";	
			var content = document.createTextNode(names);
			var DDs = document.createElement('span');
			DDs.appendChild(content);
			mnameTD.appendChild(DDs);		
		}		
		
		mnameTR.appendChild(mnameTD);

		xmlHttp = null;
	}
	
	
	
	var xmlHttpPW;

	function findPW(){
		startRequestPW();
	}


	function createXMLHttpRequestPW() {
	    if (window.ActiveXObject) {
	        xmlHttpPW = new ActiveXObject("Microsoft.XMLHTTP");
	    } 
	    else if (window.XMLHttpRequest) {
	        xmlHttpPW = new XMLHttpRequest();
	    }
	}
				
	function startRequestPW() {		
		var getMid = inputforms[2].value;
		var getMemail = inputforms[3].value;

		var url = "signinajax.do?method=getMpass";
		var url2 = "&fid="+escape(encodeURIComponent(getMid))+"&femail="+escape(encodeURIComponent(getMemail));
		
		createXMLHttpRequestPW();
	    xmlHttpPW.open("POST", url, true);
   	    xmlHttpPW.onreadystatechange = handleStateChangePW;
   	    xmlHttpPW.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	    xmlHttpPW.send(url2);
	}
	
	function handleStateChangePW() {
	    if(xmlHttpPW.readyState == 4) {
	    	if(xmlHttpPW.status == 200){
	    		parseResponsePW();	    		
			}	           
	    }
	}
	
	function parseResponsePW(){

		var mnameTR = findMid.getElementsByTagName('tr')[7];
		if(mnameTR.hasChildNodes()){
			for(var i=0;mnameTR.childNodes.length;i++){
				mnameTR.removeChild(mnameTR.childNodes[i]);			
			}
		}
		var xmlDoc = xmlHttpPW.responseXML;
		var lists = xmlDoc.getElementsByTagName('mpass');

		var mnameTD = document.createElement('td');
		mnameTD.align = 'center';
		mnameTD.colSpan = 2;
						
		for(var i=0;i<lists.length;i++){
			var names = "";			
			names = lists[i].firstChild.nodeValue;
			var content = document.createTextNode(names);
			var DDs = document.createElement('div');
			DDs.appendChild(content);
			mnameTD.appendChild(DDs);			
		}
		if(lists.length==0){
			var names = "";			
			names = "해당되는 데이터가 없습니다.";	
			var content = document.createTextNode(names);
			var DDs = document.createElement('span');
			DDs.appendChild(content);
			mnameTD.appendChild(DDs);		
		}		
		
		mnameTR.appendChild(mnameTD);

		xmlHttpPW = null;
	}
	
	